package com.echo.im.common.model.mq;

import lombok.Data;

/**
 * @author: echo
 * @time: 2024-08-18
 */
@Data
public class OfflineMsgMqInfo {

    private Long userId;
    private Integer type;
    private Long msgId;


    public enum OfflineMsgEnum {

        PRIVATE_OFFLINE_MESSAGE(1, "私聊离线消息"),
        SYSTEM_OFFLINE_MESSAGE(2, "系统离线消息");

        private Integer code;

        private  String desc;

        OfflineMsgEnum(Integer code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public Integer code() {
            return code;
        }

    }

    public OfflineMsgMqInfo(Long userId, Long msgId,OfflineMsgEnum offlineMsgEnum){
        this.type = offlineMsgEnum.code();
        this.msgId = msgId;
        this.userId = userId;
    }



}
